home *** CD-ROM | disk | FTP | other *** search
Wrap
<%@ Language=VBScript CODEPAGE=65001 %> <!--#include file="include/wmsConstants.inc"--> <!--#include file="include/wmsLocStrings.inc"--> <!--#include file="include/wmsCommon.inc"--> <!--#include file="include/wmsHeader.inc"--> <!--#include file="include/wmsRefresh.inc"--> <!--#include file="include/wmsServerHash.inc"--> <!--#include file="include/wmsconnect.inc"--> <!--#include file="include/wmsError.inc"--> <!--#include file="include/wmsPageBanner.inc"--> <!--#include file="include/wmsToolbar.inc"--> <!--#include file="include/wmsHelp.inc"--> <% '+------------------------------------------------------------------------- ' ' Microsoft Windows Media ' Copyright (C) Microsoft Corporation. All rights reserved. ' ' File: PubPoint_Collection.asp ' ' Contents: ' '-------------------------------------------------------------------------- if( 0 = Session( "PageReloadedToDisplayError" ) ) then BeginErrorHandling end if ConnectToServer if( WMS_SERVICE_STARTED <> g_dwConnectionFailureCode ) then Response.Redirect( "include/server_stopped.asp?server=" & qs("server") ) elseif( empty = g_objServer ) then ' Server.Transfer( "pubpoint_collection.asp" ) Response.Redirect( "pubpoint_collection.asp?server=" & qs("server") & "&ppID=" & qs("ppID") & "&failCode=-2" ) end if Dim dwTabIndex Dim bArrivedFromServerSideTransfer Dim bCheckFirstPubPoint dwTabIndex = 1 bCheckFirstPubPoint = FALSE bArrivedFromServerSideTransfer = Session( "bUpdateTreeView" ) Session( "bUpdateTreeView" ) = FALSE if( bArrivedFromServerSideTransfer ) then Response.Redirect( "pubpoint_collection.asp?server=" & g_strQueryStringServer & "&bUpdateTree=true&ppID=" & qs("ppID") ) Response.Flush end if '//////////////////////////////////////////////////////////////// Function CreateTabTitle( strServerName ) Dim strTemplate strTemplate = L_PUBLISHINGPOINTSTITLE_TEXT CreateTabTitle = Replace( strTemplate, "___", Server.HTMLEncode( trim( strServerName ) ), 1 ) End Function '//////////////////////////////////////////////////////////////// Function LabelValue( strValue, strLabel ) Dim strTemplate strTemplate = strLabel LabelValue = SpacesToNonbreak( Replace( RemoveDangerousCharacters( strTemplate ), "___", trim( CStr( strValue ) ), 1 ) ) End Function '////////////////////////////////////////////////////////////////////////// ' ' Insert commas, where appropriate ' function PrettyPrintNumber( dwNumPlayers ) Dim strRetVal Dim strNumPlayers Dim strTail Dim lenStrNumPlayers Dim lenStrTail if( -1 = dwNumPlayers ) then strRetVal = " - " else strNumPlayers = CStr( dwNumPlayers ) lenStrNumPlayers = Len( strNumPlayers ) while( lenStrNumPlayers >= 3 ) strTail = Right( strNumPlayers, 3 ) lenStrTail = Len( strTail ) if( 0 < lenStrTail ) then strNumPlayers = Left( strNumPlayers, lenStrNumPlayers - lenStrTail ) if( 3 <= Len( strRetVal ) ) then strRetVal = strTail & L_NUMDELIMITER_TEXT & strRetVal else strRetVal = strTail & strRetVal end if lenStrNumPlayers = Len( strNumPlayers ) end if wend if( ( 0 < Len( strNumPlayers ) ) and ( 3 <= Len( strRetVal ) ) ) then strRetVal = strNumPlayers & L_NUMDELIMITER_TEXT & strRetVal else strRetVal = strNumPlayers & strRetVal end if end if PrettyPrintNumber = SpacesToNonbreak( RemoveDangerousCharacters( strRetVal ) ) end function '//////////////////////////////////////////////////////////////// Function FormatStatusString( strPPName, strPPStatus ) Dim strFirstReplacement strFirstReplacement = Replace( L_PPPSTATTEMPL_TEXT, "_P_", trim( strPPName ), 1 ) FormatStatusString = Replace( strFirstReplacement, "_S_", Server.HTMLEncode( trim( strPPStatus ) ), 1 ) End Function '//////////////////////////////////////////////////////////////// Function InsertPPName( strPPName, strTemplate ) InsertPPName = Replace( strTemplate, "___", "'" & Server.HTMLEncode( trim( strPPName ) ) & "'", 1 ) End Function '////////////////////////////////////////////////////////////////////////// ' ' label with mbps and UNLIMITED ' Function PrettyPrintBandwidth( dwBandwidth ) if( -1 = dwBandwidth ) then PrettyPrintBandwidth = " - " 'L_UNLIMITED_TEXT elseif( 1000 < dwBandwidth ) then dwBandwidth = fix( dwBandwidth / 1000 ) if( 1000 < dwBandwidth ) then dwBandwidth = fix( dwBandwidth / 1000 ) PrettyPrintBandwidth = LabelValue( PrettyPrintNumber( CStr( dwBandwidth ) ), RemoveDangerousCharacters( L_GIGABITSPERSEC_TEXT ) ) else PrettyPrintBandwidth = LabelValue( PrettyPrintNumber( CStr( dwBandwidth ) ), RemoveDangerousCharacters( L_MEGABITSPERSEC_TEXT ) ) end if else PrettyPrintBandwidth = LabelValue( PrettyPrintNumber( CStr( dwBandwidth ) ), RemoveDangerousCharacters( L_KBITSPERSEC_TEXT ) ) end if End Function WriteHTMLHeader( CreateTabTitle( g_strDecodedServerName ) ) %> <script language="JavaScript" src="include/WMSCommon.js"></script> <script language="JavaScript"> <!-- /*@cc_on @*/ <% WriteCommonJSUtils %> --> </script> <link rel="stylesheet" type="text/css" href="<%= Session( "cssName" ) %>"> </head> <body topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0" onLoad="JavaScript:<% if ( "" <> qs("bUpdateTree") ) then %>UpdateTreeView();<% end if %>DrawCurrentToolbarSelection();Initialize();" oncontextmenu="JavaScript:event.cancelBubble=true;return false;"> <table valign="top" width="100%" height="85" cellspacing="0" cellpadding="0" border="0" class="bannerName" <% if brMSIE <> g_dwBrowserType then %>bgproperties="fixed" bgcolor="#FFFFFF" background="img/gradient_tabview.png"<% end if %>> <% if brMSIE = g_dwBrowserType then %><img height="85" width="100%" src="img/gradient_tabview.png" style="position:absolute;top=0;left=0;z-index=-1"><% end if %> <tr> <td> <table valign="top" width="100%" hspace="0" vspace="0" cellspacing="4" cellpadding="1" border="0" style="BORDER-COLLAPSE: collapse" margin-top="0" margin-bottom="0"> <tr> <td width="4"> </td> <td valign="middle" align="left" width="32"> <img src="img/pubpoints_32.gif" border="0" height=32 width=32> </td> <td width="4"> </td> <td align="left" width="100%"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <% 'server name %> <td valign="bottom" align="left"> <div class="bannerName" nowrap> <%= CreateTabTitle( g_strServerName ) %> </div> </td> <td valign="top" align="right"> </td> </tr> </table> </td> <% if( FALSE = g_bSecureConnection ) then %> <script language="JavaScript"> ShowHideSecureWarning( "img/not_secure_32.gif" ); </script><% end if %> </tr> </table> </td> </tr> </table> <p> <table width=100% cellspacing="0" cellpadding=4 border="0" > <tr> <td> <form name="pplist" AUTOCOMPLETE="OFF" onsubmit="JavaScript:return( false );"> <table cellspacing="0" cellpadding="0" border="1" width=100%> <tr> <td> <table cellspacing="0" cellpadding=3 border="0" width=100%> <tr class="colheader"> <Td width="16" valign="top"> </Td> <Td valign="top" nowrap><span class="colheadertext" nowrap> <%= Server.HTMLEncode( L_NAME_TEXT ) %> </span></td> <Td valign="top" nowrap><span class="colheadertext" nowrap> <%= Server.HTMLEncode( L_TYPE_TEXT ) %> </span></td> <Td valign="top" nowrap><span class="colheadertext" nowrap> <%= Server.HTMLEncode( L_CONTENTLOCATION_TEXT ) %> </span></td> <Td valign="top" nowrap><span class="colheadertext" nowrap> <%= Server.HTMLEncode( L_STATUS_TEXT ) %> </span></td> <Td valign="top" nowrap><center><span class="colheadertext" nowrap><%= Server.HTMLEncode( L_PLAYERLIMITS_TEXT ) %> </span><div class="colheadertext"><%= L_PLAYERLIMITSLABEL_TEXT %></div></center></td> <Td valign="top" nowrap><center><span class="colheadertext" nowrap><%= Server.HTMLEncode( L_BANDWIDTHLIMITS_TEXT ) %> </span><div class="colheadertext"><%= L_BWLIMITSLABEL_TEXT %></div></center></td> </tr> <% Dim iPPcount, i, dwListedPPIndex Dim szInputName, strPPName, strPPID Dim pp Dim bPubPointIsStarted Dim dwPubPointStatus Dim dwPubPointType Dim bAllowClientsToConnect Dim dwNumconnectedPlayers Dim bPubPointChecked Dim bThisItemChecked Dim szPPToCheck, lPubPointIndexToCheck Dim szbCheckedPPIsBroadcast Dim szbCheckedPPIsStarted Dim szbCheckedPPIsAllowingConnections Dim szbCheckedPPHasConnectedClients Dim strAltText Dim bPush szbCheckedPPIsBroadcast = "false" szbCheckedPPIsStarted = "false" szbCheckedPPIsAllowingConnections = "false" szbCheckedPPHasConnectedClients = "false" szPPIDToCheck = CStr( qs("ppID") ) if( 0 = Len( szPPIDToCheck ) ) then ' on error resume next szPPToCheck = SafeUnescape( RemoveDangerousCharacters( qs("pp") ) ) lPubPointIndexToCheck = PPNameToIndex(g_objServer, szPPToCheck ) if( 0 <= lPubPointIndexToCheck ) then szPPIDToCheck = g_objServer.PublishingPoints( lPubPointIndexToCheck ).ID end if end if bPubPointChecked = FALSE iPPcount = g_objServer.PublishingPoints.Count i = 0 dwListedPPIndex = 0 While (i < iPPcount) dwPubPointType = 0 dwPubPointStatus = 0 set pp = g_objServer.PublishingPoints(i) dwPubPointType = pp.Type if( WMS_PUBLISHING_POINT_TYPE_ON_DEMAND = dwPubPointType ) or ( WMS_PUBLISHING_POINT_TYPE_BROADCAST = dwPubPointType ) then strPPName = pp.name if( 0 = StrComp( "/", strPPName, vbTextCompare ) ) then strPPName = L_DEFAULTPPNAME_TEXT end if strPPPath = TrimFileColon( pp.path ) strPPPath = URLDecode( strPPPath ) strPPID = pp.ID szInputName = i dwListedPPIndex = dwListedPPIndex + 1 bThisItemChecked = FALSE bAllowClientsToConnect = pp.AllowClientsToConnect if( WMS_PUBLISHING_POINT_TYPE_ON_DEMAND = dwPubPointType ) then dwPubPointStatus = pp.Status if bAllowClientsToConnect then bPubPointIsStarted = TRUE else bPubPointIsStarted = FALSE end if strAltText = InsertPPName( strPPName, L_CONFIGODPP_TEXT ) if( FALSE = bAllowClientsToConnect ) then strAltText = FormatStatusString( strAltText, L_DENYING_TEXT ) ' else ' strAltText = FormatStatusString( strAltText, L_ALLOWING_TEXT ) end if else dwPubPointStatus = pp.BroadcastStatus if 0 <> ( WMS_BROADCAST_PUBLISHING_POINT_STARTED and dwPubPointStatus ) then bPubPointIsStarted = TRUE else bPubPointIsStarted = FALSE end if bPush = CBool( 0 = StrComp( Left( strPPPath, 5 ), "push:" ) ) if( bPush ) then strAltText = InsertPPName( strPPName, L_CONFIGBCPUSHPP_TEXT ) else strAltText = InsertPPName( strPPName, L_CONFIGBCPP_TEXT ) end if if( bPubPointIsStarted ) then if( FALSE = bAllowClientsToConnect ) then strAltText = FormatStatusString( strAltText, L_STARTEDBUTDENYING_TEXT ) else strAltText = FormatStatusString( strAltText, L_PPISSTARTED_TEXT ) end if else strAltText = FormatStatusString( strAltText, L_PPISSTOPPED_TEXT ) end if end if dwNumconnectedPlayers = pp.CurrentCounters.ConnectedPlayers %> <tr bgcolor="#ffffff"> <td width="16"><div class="small"> <input type="radio" name="pp" onClick="JavaScript:g_bAllow=<%= BoolToText( bAllowClientsToConnect ) %>;g_bConnectedClients=<%= BoolToText( 0 < dwNumconnectedPlayers ) %>;g_bBroadcast=<%= BoolToText( WMS_PUBLISHING_POINT_TYPE_ON_DEMAND <> dwPubPointType ) %>;g_bStarted=<%= BoolToText( bPubPointIsStarted ) %>;DrawCurrentToolbarSelection();" id="pp<%= iPPCount %>" value="<%= Server.HTMLEncode( strPPID ) %>" tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> <% if( 0 = StrComp( szPPIDToCheck, strPPID ) ) then %> checked <% bPubPointChecked = TRUE bThisItemChecked = TRUE elseif ( ( "" = qs("ppID") ) and ( "" = qs("pp") ) and ( not bPubPointChecked ) ) then %> checked <% bPubPointChecked = TRUE bThisItemChecked = TRUE elseif ( iPPcount - 1 = i ) and ( not bPubPointChecked ) then %> checked <% bPubPointChecked = TRUE bThisItemChecked = TRUE end if ' Build button state for initial checked selection if( bThisItemChecked ) then if( WMS_PUBLISHING_POINT_TYPE_BROADCAST = dwPubPointType ) then szbCheckedPPIsBroadcast = "true" if( bPubPointIsStarted ) then szbCheckedPPIsStarted = "true" else szbCheckedPPIsStarted = "false" end if else szbCheckedPPIsBroadcast = "false" szbCheckedPPIsStarted = "false" end if if( bAllowClientsToConnect ) then szbCheckedPPIsAllowingConnections = "true" else szbCheckedPPIsAllowingConnections = "false" end if if( 0 < dwNumconnectedPlayers ) then szbCheckedPPHasConnectedClients = "true" else szbCheckedPPHasConnectedClients = "false" end if end if %> > </div></td> <td> <label for="pp<%= iPPCount%>"><b><u><a href="pubpoint_status.asp?server=<%= g_strQueryStringServer %>&ppID=<%= strPPID %>" title="<%= strAltText %>" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> ><%= Server.HTMLEncode( ConvertPPName( strPPName, -1 ) )%></a><u></b></label> </td> <td> <div class="small"> <% Select Case dwPubPointType Case WMS_PUBLISHING_POINT_TYPE_ON_DEMAND %><span onClick="JavaScript:SimulateCheckedPP( <%= dwListedPPIndex - 1 %> );"><%= Server.HTMLEncode( L_ONDEMAND_TEXT ) %></script><% Case WMS_PUBLISHING_POINT_TYPE_BROADCAST %><span onClick="JavaScript:SimulateCheckedPP( <%= dwListedPPIndex - 1 %> );"><%= Server.HTMLEncode( L_BROADCASTLCASE_TEXT ) %></script><% Case Else End Select %> </div> </td> <td > <div class="small" title="<%= Server.HTMLEncode( strPPPath ) %>"><% if( 0 = Len( strPPPath ) ) then strPPPath = " " end if %> <span onClick="JavaScript:SimulateCheckedPP( <%= dwListedPPIndex - 1 %> );"><%= Server.HTMLEncode( strPPPath ) %></script> </div> </td> <td > <div class="small"> <% if WMS_PUBLISHING_POINT_TYPE_BROADCAST = dwPubPointType then %> <% if bPubPointIsStarted then %> <% if bAllowClientsToConnect then %> <span onClick="JavaScript:SimulateCheckedPP( <%= dwListedPPIndex - 1 %> );"><%= Server.HTMLEncode( L_STARTED_TEXT ) %></script> <% else %> <span onClick="JavaScript:SimulateCheckedPP( <%= dwListedPPIndex - 1 %> );"><%= Server.HTMLEncode( L_STARTEDDENYINGNEWCONNECTIONS_TEXT ) %></script> <% end if %> <% else %> <span onClick="JavaScript:SimulateCheckedPP( <%= dwListedPPIndex - 1 %> );"><%= Server.HTMLEncode( L_STOPPED_TEXT ) %></script> <% end if %> <% else %> <% if bAllowClientsToConnect then %> <span onClick="JavaScript:SimulateCheckedPP( <%= dwListedPPIndex - 1 %> );"><%= Server.HTMLEncode( L_ALLOWINGNEWCONNECTIONS_TEXT ) %></script> <% else %> <span onClick="JavaScript:SimulateCheckedPP( <%= dwListedPPIndex - 1 %> );"><%= Server.HTMLEncode( L_DENYINGNEWCONNECTIONS_TEXT ) %></script> <% end if %> <% end if %> </div> </td> <td > <center> <table cellspacing="0" cellpadding=1> <tr> <td> <div class="small"> <% if BROADCAST = dwPubPointType then if bPubPointIsStarted then %><span onClick="JavaScript:SimulateCheckedPP( <%= dwListedPPIndex - 1 %> );"><%= PrettyPrintNumber( dwNumconnectedPlayers ) & " / " & PrettyPrintNumber( pp.Limits.ConnectedPlayers ) %></script><% else %><span onClick="JavaScript:SimulateCheckedPP( <%= dwListedPPIndex - 1 %> );"><%= " - / - " %></script><% end if else %><span onClick="JavaScript:SimulateCheckedPP( <%= dwListedPPIndex - 1 %> );"><%= PrettyPrintNumber( dwNumconnectedPlayers ) & " / " & PrettyPrintNumber( pp.Limits.ConnectedPlayers ) %></script><% end if %> </div> </td> </tr> </table> </center> </td> <td > <center> <table cellspacing="0" cellpadding="1" border="0"> <tr> <td><div class="small"> <% if BROADCAST = dwPubPointType then if bPubPointIsStarted then %><span onClick="JavaScript:SimulateCheckedPP( <%= dwListedPPIndex - 1 %> );"><%= PrettyPrintBandwidth( CDbl( pp.CurrentCounters.PlayerAllocatedBandwidth ) ) & " / " & PrettyPrintBandwidth( pp.Limits.PlayerBandwidth ) %></script><% else %><span onClick="JavaScript:SimulateCheckedPP( <%= dwListedPPIndex - 1 %> );"><%= " - / - " %></script><% end if else %><span onClick="JavaScript:SimulateCheckedPP( <%= dwListedPPIndex - 1 %> );"><%= PrettyPrintBandwidth( CDbl( pp.CurrentCounters.PlayerAllocatedBandwidth ) ) & " / " & PrettyPrintBandwidth( pp.Limits.PlayerBandwidth ) %></script><% end if %> </div></td> </tr> </table> </center> </td> </tr> <% rem rem if neither cache nor proxy end if i = i + 1 Wend if( ( not bPubPointChecked ) and ( 0 < dwListedPPIndex ) ) then bCheckFirstPubPoint = TRUE end if %> </table> </td> </tr> </table> </form> </tr> <TR> <TD> </TD> </TR> <tr> <td> <% ToolbarButtonText ( 0 ) = L_ADDPPBUTTON_TEXT ToolbarButtonImage( 0 ) = IMAGE_PP_PPADD ToolbarButtonLink ( 0 ) = "JavaScript:AddNew();" ToolbarButtonAltText( 0 ) = L_BUTTONADDPUBPOINT_TEXT ToolbarButtonText ( 1 ) = L_BUTTONREMOVE_TEXT ToolbarButtonImage( 1 ) = IMAGE_REMOVE ToolbarButtonLink ( 1 ) = "JavaScript:Remove();" ToolbarButtonAltText( 1 ) = L_REMOVEPP_TEXT ToolbarButtonText ( 2 ) = L_BUTTONSTART_TEXT ToolbarButtonImage( 2 ) = IMAGE_PP_START ToolbarButtonImageDisabled( 2 ) = IMAGE_PP_STARTG ToolbarButtonLink ( 2 ) = "JavaScript:Start();" ToolbarButtonAltText( 2 ) = L_STARTTHEPUBPOINT_TEXT ToolbarButtonText ( 3 ) = L_BUTTONSTOP_TEXT ToolbarButtonImage( 3 ) = IMAGE_STOP ToolbarButtonImageDisabled( 3 ) = IMAGE_STOPG ToolbarButtonLink ( 3 ) = "JavaScript:Stop();" ToolbarButtonAltText( 3 ) = L_STOPTHEPUBPOINT_TEXT ToolbarButtonText ( 4 ) = L_BUTTONALLOWNEWCONNECTIONS_TEXT ToolbarButtonImage( 4 ) = IMAGE_ALLOWCONNECTIONS ToolbarButtonLink ( 4 ) = "JavaScript:Allow();" ToolbarButtonImageDisabled( 4 ) = IMAGE_ALLOWCONNECTIONSG ToolbarButtonAltText( 4 ) = L_ALLOWUCONNECTIONS_TEXT ToolbarButtonText ( 5 ) = L_BUTTONDENYNEWCONNECTIONS_TEXT ToolbarButtonImage( 5 ) = IMAGE_DENYCONNECTIONS ToolbarButtonLink ( 5 ) = "JavaScript:Deny();" ToolbarButtonImageDisabled( 5 ) = IMAGE_DENYCONNECTIONSG ToolbarButtonAltText( 5 ) = L_DENYUCONNECTIONS_TEXT ToolbarButtonText ( 6 ) = L_DISCONNECTALLBUTTON_TEXT ToolbarButtonImage( 6 ) = IMAGE_PP_DISCONNECT ToolbarButtonLink ( 6 ) = "JavaScript:DisconnectAllClients()" ToolbarButtonImageDisabled( 6 ) = IMAGE_PP_DISCONNECTG ToolbarButtonAltText( 6 ) = L_DISCONNECT_TEXT ToolbarButtonText ( 7 ) = L_BUTTONRENAME_TEXT ToolbarButtonImage( 7 ) = IMAGE_RENAME ToolbarButtonLink ( 7 ) = "JavaScript:Rename();" ToolbarButtonAltText( 7 ) = L_RENAMEPP_TEXT ToolbarButtonText ( 8 ) = L_BUTTONDUPLICATE_TEXT ToolbarButtonImage( 8 ) = IMAGE_PP_DUP ToolbarButtonLink ( 8 ) = "JavaScript:Duplicate();" ToolbarButtonAltText( 8 ) = L_DUPPP_TEXT dwLastToolbarIndex = 8 if( Session( "ShowServerList" ) ) then dwLastToolbarIndex = dwLastToolbarIndex + 1 ToolbarButtonText ( dwLastToolbarIndex ) = L_BUTTONRETURNTOSERVERLIST_TEXT ToolbarButtonImage( dwLastToolbarIndex ) = IMAGE_SERVERLIST ToolbarButtonLink ( dwLastToolbarIndex ) = SERVERSLIST_PATH ToolbarButtonAltText( dwLastToolbarIndex ) = L_RETURNTOSL_TEXT end if dwLastToolbarIndex = dwLastToolbarIndex + 1 ToolbarButtonText ( dwLastToolbarIndex ) = L_BUTTONHELP_TEXT ToolbarButtonImage( dwLastToolbarIndex ) = IMAGE_HELP ToolbarButtonLink ( dwLastToolbarIndex ) = HELPTOKEN ToolbarButtonAltText ( dwLastToolbarIndex ) = L_BUTTONHELP_TEXT ToolbarHelpURL = H_PPDEFAULTHELPTOPIC ToolbarNesting = H_PPLEVEL %> <% DrawToolbar TRUE, ( dwLastToolbarIndex + 1 ) %> </td> </tr> </table> <% DrawRefreshControl TRUE DrawCopyrightInfo AlertUserWithPopupErrorDialog if 0 <> Session( "ErrorNumber" ) then %> <script language=JavaScript> document.location = document.location<% if 0 = Len( qs("ppID") ) then %> + "&ppID=<%= qs("ppID") %>"<% end if %>; </script><% end if ' OnErrorGoBack ' DrawStdFooter %> </body> <script language="JavaScript"> <!-- /*@cc_on @*/ var g_bBroadcast = <%= szbCheckedPPIsBroadcast %>; var g_bStarted = <%= szbCheckedPPIsStarted %>; var g_bAllow = <%= szbCheckedPPIsAllowingConnections %>; var g_bConnectedClients = <%= szbCheckedPPHasConnectedClients %>; var g_bStateInitialized = false; ////////////////////////////////////////////////////////////////////////// function DrawCurrentToolbarSelection() { <% jsTRY %> <% if( bCheckFirstPubPoint ) then %> if( ( ! g_bStateInitialized ) && document.pplist && document.pplist[ <%= dwListedPPIndex - 1 %> ] ) { g_bStateInitialized = true; document.pplist[ <%= dwListedPPIndex - 1 %> ].checked = true; document.pplist[ <%= dwListedPPIndex - 1 %> ].click(); }<% end if %> SetBroadcastMode( g_bBroadcast, g_bStarted ); SetConnectMode( g_bAllow ); SetDisconnectMode( g_bConnectedClients ); g_bToolbarLoaded = true; <% jsCATCH %> } ////////////////////////////////////////////////////////////////////////// function SetBroadcastMode( bBroadcastPP, bPubPointIsStarted ) { <% jsTRY %> g_bBroadcast = bBroadcastPP; if( ! g_bBroadcast ) { EnableToolbarItem( 2, false ); EnableToolbarItem( 3, false ); } else { g_bStarted = bPubPointIsStarted; EnableToolbarItem( 2, ! g_bStarted ); EnableToolbarItem( 3, g_bStarted ); } <% jsCATCH %> } ////////////////////////////////////////////////////////////////////////// function SetConnectMode( bAllowingNewConnections ) { <% jsTRY %> g_bAllow = bAllowingNewConnections; EnableToolbarItem( 4, ! g_bAllow ); EnableToolbarItem( 5, g_bAllow ); <% jsCATCH %> } ////////////////////////////////////////////////////////////////////////// function SetDisconnectMode( bPlayersAreConnected ) { <% jsTRY %> g_bConnectedClients = bPlayersAreConnected; EnableToolbarItem( 6, g_bConnectedClients ); <% jsCATCH %> } ////////////////////////////////////////////////////////////////////////// function SimulateCheckedPP( dwWhichItem ) { <% jsTRY %> var e; e = document.pplist[ dwWhichItem ]; e.checked = true; return null; <% jsCATCH %> } ////////////////////////////////////////////////////////////////////////// function GetCheckedItem() { <% jsTRY %> var i; var e; for(i = 0; i < document.pplist.length; i++) { e = document.pplist[i]; if ( e.checked ) { return( e.value ); } } <% jsCATCH %> return null; } ////////////////////////////////////////////////////////////////////////// function AddNew() { <% jsTRY %> document.location = "pubpoint_add.asp?server=<%= g_strQueryStringServer %>&referrer=pplist&ppID=" + GetCheckedItem(); <% jsCATCH %> } ////////////////////////////////////////////////////////////////////////// function Remove() { <% jsTRY %> var szPubPointID; szPubPointID = GetCheckedItem(); if(szPubPointID != null) { if( true == window.confirm( "<%= RemoveDangerousCharacters( L_CONFIRMDELETEPUBPOINT_TEXT ) %>" ) ) { document.location = "pp_action.asp?server=<%= g_strQueryStringServer %>" + "&ppID=" + SafeEscape( szPubPointID ) + "&op=delete&referrer=pubpoint_collection.asp" ; } } else { window.alert( "<%= RemoveDangerousCharacters( L_PLEASESELECTAPUBPOINT_TEXT ) %>" ); } <% jsCATCH %> } ////////////////////////////////////////////////////////////////////////// function DisconnectAll() { <% jsTRY %> var szPubPointID; szPubPointID = GetCheckedItem(); if(szPubPointID != null) { document.location = "pp_action.asp?referrer=list&server=<%= g_strQueryStringServer %>&op=rampdown&ppID=" + SafeEscape( szPubPointID ); } else { window.alert( "<%= RemoveDangerousCharacters( L_PLEASESELECTAPUBPOINT_TEXT ) %>" ); } <% jsCATCH %> } ////////////////////////////////////////////////////////////////////////// function Rename() { <% jsTRY %> var szNewName; szNewName = ""; var szInstance; szInstance = GetCheckedItem(); if( null != szInstance ) { document.location = "pubpoint_dialog.asp?server=<%= g_strQueryStringServer %>&op=rename&ppID=" + SafeEscape( szInstance ); return; } else { window.alert( " <%= RemoveDangerousCharacters( L_PLEASESELECTAPUBPT_TEXT ) %>" ); } <% jsCATCH %> } ////////////////////////////////////////////////////////////////////////// function Duplicate() { <% jsTRY %> var szNewName; szNewName = ""; var szPubPointID; szPubPointID = GetCheckedItem(); if( null != szPubPointID ) { document.location = "pubpoint_dialog.asp?server=<%= g_strQueryStringServer %>&op=duplicate&ppID=" + szPubPointID; return; } else { window.alert( " <%= RemoveDangerousCharacters( L_PLEASESELECTAPUBPT_TEXT ) %>" ); } <% jsCATCH %> } ////////////////////////////////////////////////////////////////////////// function Start() { <% jsTRY %> if( ( ! g_bBroadcast ) || g_bStarted ) { return; } var szPubPointID; szPubPointID = GetCheckedItem(); if( szPubPointID != null ) { document.location = "pp_action.asp?server=<%= g_strQueryStringServer %>&op=start&ppID=" + szPubPointID; } else { window.alert( "<%= RemoveDangerousCharacters( L_PLEASESELECTAPUBPOINT_TEXT ) %>" ); } <% jsCATCH %> } ////////////////////////////////////////////////////////////////////////// function Stop(szPubPointID, i) { <% jsTRY %> if( ( ! g_bBroadcast ) || ! g_bStarted ) { return; } var szPubPointID; szPubPointID = GetCheckedItem(); if( szPubPointID != null ) { document.location = "pp_action.asp?server=<%= g_strQueryStringServer %>&op=stop&ppID=" + szPubPointID; } else { window.alert( "<%= RemoveDangerousCharacters( L_PLEASESELECTAPUBPOINT_TEXT ) %>" ); } <% jsCATCH %> } ////////////////////////////////////////////////////////////////////////// function Deny() { <% jsTRY %> if( ! g_bAllow ) { return; } var szPubPointID; szPubPointID = GetCheckedItem(); if( szPubPointID != null ) { document.location = "pp_action.asp?server=<%= g_strQueryStringServer %>&op=deny&ppID=" + szPubPointID; } else { window.alert( "<%= RemoveDangerousCharacters( L_PLEASESELECTAPUBPOINT_TEXT ) %>" ); } <% jsCATCH %> } ////////////////////////////////////////////////////////////////////////// function DisconnectAllClients() { <% jsTRY %> if( !g_bConnectedClients ) { return; } if( true == window.confirm( "<%= RemoveDangerousCharacters( L_CONFIRMDISCONNECT_TEXT ) %>" ) ) { var szPubPointID; szPubPointID = GetCheckedItem(); if( szPubPointID != null ) { document.location = "pp_action.asp?server=<%= g_strQueryStringServer %>&op=rampdown&ppID=" + szPubPointID; } else { window.alert( "<%= RemoveDangerousCharacters( L_PLEASESELECTANODPUBPOINT_TEXT ) %>" ); } } <% jsCATCH %> } ////////////////////////////////////////////////////////////////////////// function Allow() { <% jsTRY %> if( g_bAllow ) { return; } var szPubPointID; szPubPointID = GetCheckedItem(); if( szPubPointID != null ) { document.location = "pp_action.asp?server=<%= g_strQueryStringServer %>&op=allow&ppID=" + szPubPointID; } else { window.alert( "<%= RemoveDangerousCharacters( L_PLEASESELECTAPUBPOINT_TEXT ) %>" ); } <% jsCATCH %> } ////////////////////////////////////////////////////////////////////////// function Refresh() { <% jsTRY %> var szPubPointID; szPubPointID = GetCheckedItem(); if( szPubPointID != null ) { document.location = "pubpoint_collection.asp?server=<%= g_strQueryStringServer %>&ppID=" + szPubPointID; } else { document.location = document.location; } <% jsCATCH %> } <% if ( brMSIE = g_dwBrowserType ) then %> ////////////////////////////////////////////////////////////////////////// function HilightCurrentNode() { <% jsTRY %> <% if( 0 < Len( qs("bUpdateTree") ) ) then %> return; <% else %> var childFrame; var framesetHeader; if( window.parent && window.parent.parent ) { framesetHeader = window.parent.parent; if( ! framesetHeader.IsTreeReady() ) { setTimeout( "HilightCurrentNode();", 1000, "JavaScript" ); return; } } if( window.parent && window.parent.frames && window.parent.frames[ "treeFrames" ] && window.parent.frames[ "treeFrames" ].frames ) { childFrame = window.parent.frames[ "treeFrames" ].frames[ "frameTreeCode" ]; } if( childFrame ) { if( childFrame.Initialized() ) { childFrame.SetSelectedNode( "pubpoints" ); } else { setTimeout( "HilightCurrentNode();", 1000, "JavaScript" ); } } <% end if %> <% jsCATCH %> } <% end if %> ////////////////////////////////////////////////////////////////////////// function Initialize() { <% if ( brMSIE = g_dwBrowserType ) then %> setTimeout( "HilightCurrentNode();", 50, "JavaScript" ); <% end if %> } --> </script> </html> <% LatchCurrentPage "pubpoints/pubpoint_collection.asp", qs EndErrorHandling "pubpoint_collection.asp" on error resume next WMSServerHashASPCleanup WMSConnectASPCleanup %>